import rest from '@/api/request'

export function getSocialTableList(data: any) {
    return rest.post(`/social_securitys/list`, JSON.stringify(data))
}

export function addSocialTable() {
    return rest.get("/company/department")
}
//查询城市
export function getCity() {
    return rest.get("/sys/city")
}
//查询当月报表
export function getSocialTable(yearMonth: string) {
    return rest.get(`/social_securitys/historys/${yearMonth}?opType=1`)
}//制作新报表
export function addSocialTables(yearMonth: any) {
    return rest.put(`/social_securitys/historys/${yearMonth}/newReport`)
}
//社保数据归档
export function archiveSocialTables(yearMonth: any) {
    return rest.post(`/social_securitys/historys/${yearMonth}/archive`)
}
//查询社保历史归档列表
export function getSocialArchiveList(year: string) {
    return rest.get(`/social_securitys/historys/${year}/list`)
}
// 批量-导出社保月份报表
export function getTablehistory(yearMonth: string) {
    return rest.get(`/social_securitys/historys/${yearMonth}/export?opType=1`, {
        responseType: "arraybuffer",
    })
}